package com.jty.lib_base.data.source

import com.jty.lib_base.data.bean.CurrentStudyYearBean
import com.jty.lib_base.data.bean.LoginBean
import com.jty.lib_base.data.bean.UserInfoBean
import java.io.Serializable


/**
 * author: zhouyh
 * created on: 2021/5/11 5:11 下午
 * description:本地数据源
 */
interface LocalDataSource {

    fun getLoginName():String?
    fun getLoginPassword():String?
    //保存账号密码
    fun saveAccountAndPwd(account:String,password:String)
    fun getToken():String?
    fun saveUserInfoData(userBean: UserInfoBean)
    fun saveLoginData(loginBean : LoginBean)
    fun getLoginData():LoginBean?
    fun getUserInfoData(): UserInfoBean?
    fun getPenMac():String?
    fun <T:Serializable>saveCacheListData(list: List<T>)
    fun <T:Serializable>getCacheListData(key:String):List<T>?
    fun getUserId(): Int?
    fun getUserName(): String?
    fun isLogin():Boolean
    fun saveLoginState(isLogin:Boolean)


    /**
     * 当前学年数据
     */
    fun saveCurrentStudyYearData(studyYearBean: CurrentStudyYearBean)
    fun getCurrentStudyYearData():CurrentStudyYearBean?

    //记住密码
    fun savePwdFlag(isVisible:Boolean = true)
    fun getPwdFlag():Boolean

    fun savePenMac(penMac: String)

    //退出登录重置存储
    fun outLoginReset()



}